package com.easyfun.healthmagicbox.sync;

import android.content.Context;

import com.easyfun.healthmagicbox.comm.AlarmClockDownloadTask;
import com.easyfun.healthmagicbox.comm.HealthInputDataDownloadTask;
import com.easyfun.healthmagicbox.comm.HealthThreadPool;
import com.easyfun.healthmagicbox.comm.PersonQuestionsDownloadTask;
import com.easyfun.healthmagicbox.comm.PicturesDownloadTask;
import com.easyfun.healthmagicbox.comm.SuggestionDownloadTask;

public class SyncUtility {
	public static void syncPersonAll(String personID,Context context) {
		
		HealthInputDataDownloadTask hiddtask = new HealthInputDataDownloadTask(
				context, 
				personID, 
				new BasicCommCallback());
		HealthThreadPool.getInstance().execute(hiddtask);
		
		//----------------------------------------------------------
		SuggestionDownloadTask task = new SuggestionDownloadTask(
				context, 
				personID, 
				new BasicCommCallback());
		HealthThreadPool.getInstance().execute(task);
		
		//----------------------------------------------------------
		PicturesDownloadTask pictask = new PicturesDownloadTask(
				context
				, personID, new BasicCommCallback());
		HealthThreadPool.getInstance().execute(pictask);
		
		//----------------------------------------------------------
		PersonQuestionsDownloadTask questiontask = new PersonQuestionsDownloadTask(
				context
				, personID, new BasicCommCallback());
		HealthThreadPool.getInstance().execute(questiontask);
		
		//----------------------------------------------------------
		
		CommCallback callback = new BasicCommCallback();
		AlarmClockDownloadTask clocktask = new AlarmClockDownloadTask(
				context, 
				personID, 
				callback);
		HealthThreadPool.getInstance().execute(clocktask);
		
	}
}
